<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>
<%
	request.setAttribute("title", "我的订单");
%>
<%@ include file="/WEB-INF/views/shared/master/weContentHeader.jsp"%>
<style>

	.tab li{
		min-width:120px;
		width:33.3%;
	}
	a{
		color:#000;
	}
	.claim-green-pipe .weui-grid{
		width:33.3%;
		padding: 5px 0px;
	}
	
	.orderitem>div{
		padding:10px 10px;
		border-bottom: 1px solid #eee; 
	}
	.orderitemtittle{
		color:#afafaf;
	}
	.ordermoney{
		color: red;
	}
	.orderno{
		color: red;
	}
	.orderok{
		color: #2196F3;
	}
	.ordermsg{
		margin: 15px;
		text-align: center;
		color: #afafaf;
	}
</style>



<%@ include file="/WEB-INF/views/shared/master/weTitle.jsp"%>
<div class="goback" data-back-point="personCenter"></div>
<div>
	<div class="tab-container" data-id="claim-container" id="claim-tab">
		<ul class="tab tab-horizontal" style="">
			<li data-id="tab1" class="active">
				<span>全部</span>
			</li>
			<li data-id="tab2" class="">
				<span>待支付</span>
			</li>
			<li data-id="tab3" class="">
				<span>已完成</span>
			</li>
		</ul>
	</div>
</div>

<div id="claim-container">
	<div class="tab-content active" id="tab1">
		<input type="hidden" value="${ordermsg}" id="p-ordermsg">	
		<p class="ordermsg" id="ordermsg">${ordermsg}</p>
		<c:forEach items="${orders}" var="order">
			<a href="<c:url value='/wechat/order/order/orderDetail?id=${order.id}'/>">
				<div class="orderitem">
					<div>
						<span class="orderitemtittle">订单号：</span>
						<span>${order.insuOrderNo}</span>
					</div>			
					<div>
						<p>
							<span class="orderitemtittle">状&nbsp;&nbsp;&nbsp;态：</span>
							<c:if test="${order.state==0}">
								<span class="orderok">已完成</span>
							</c:if>
							<c:if test="${order.state==1}">
								<span class="orderno">待支付</span>
							</c:if>						
						</p>
						<p>
							<span class="orderitemtittle">总&nbsp;&nbsp;&nbsp;价：</span>
							<span class="ordermoney"><span>￥</span>${order.goodMoney}</span>
						</p>
					</div>			
					<div>
						<span class="orderitemtittle">保险名称：</span>
						<span>${order.goodName}</span>
					</div>
					<div>
						<span class="orderitemtittle">创建时间：</span>
						<fmt:formatDate value="${order.createTime}" pattern="yyyy/MM/dd HH:mm:ss"/>
					</div>			
					<div style="width:100%;height:15px;background-color: #ebebeb;padding: 0px"></div>			
				</div>
			</a>
		</c:forEach>	
		
	</div>
	
	<div class="tab-content" id="tab2">
		<input type="hidden" value="${noOrdersmsg}" id="p-noOrdersmsg">
		<p class="ordermsg" id="noOrdersmsg">${noOrdersmsg}</p>
		<c:forEach items="${noOrders}" var="noOrder">
			<a href="<c:url value='/wechat/order/order/orderDetail?key=${noOrder.id}'/>">		
				<div class="orderitem">
					<div>
						<span class="orderitemtittle">订单号：</span>
						<span>${noOrder.insuOrderNo}</span>
					</div>
					<div>
						<p>
							<span class="orderitemtittle">状&nbsp;&nbsp;&nbsp;态：</span>
							<c:if test="${noOrder.state==0}">
								<span class="orderok">已完成</span>
							</c:if>
							<c:if test="${noOrder.state==1}">
								<span class="orderno">待支付</span>
							</c:if>						
						</p>
						<p>
							<span class="orderitemtittle">总&nbsp;&nbsp;&nbsp;价：</span>
							<span class="ordermoney"><span>￥</span>${noOrder.goodMoney}</span>
						</p>
					</div>			
					<div>
						<span class="orderitemtittle">保险名称：</span>
						<span>${noOrder.goodName}</span>
					</div>
					<div>
						<span class="orderitemtittle">创建时间：</span>
						<fmt:formatDate value="${noOrder.createTime}" pattern="yyyy/MM/dd HH:mm:ss"/>
					</div>
					<div style="width:100%;height:15px;background-color: #ebebeb;padding: 0px"></div>			
				</div>
			</a>
		</c:forEach>	
	</div>
	
	<div class="tab-content" id="tab3">
		<input type="hidden" value="${okOrdersmsg}" id="okOrdersmsg">
		<p class="ordermsg" id="p-okOrdersmsg">${okOrdersmsg}</p>
		<c:forEach items="${okOrders}" var="okOrder">
			<a href="<c:url value='/wechat/order/order/orderDetail?key=${okOrder.id}'/>">		
				<div class="orderitem">
					<div>
						<span class="orderitemtittle">订单号：</span>
						<span>${okOrder.insuOrderNo}</span>
					</div>
					<div>
						<p>
							<span class="orderitemtittle">状&nbsp;&nbsp;&nbsp;态：</span>
							<c:if test="${okOrder.state==0}">
								<span class="orderok">已完成</span>
							</c:if>
							<c:if test="${okOrder.state==1}">
								<span class="orderno">待支付</span>
							</c:if>						
						</p>
						<p>
							<span class="orderitemtittle">总&nbsp;&nbsp;&nbsp;价：</span>
							<span class="ordermoney"><span>￥</span>${okOrder.goodMoney}</span>
						</p>
					</div>			
					<div>
						<span class="orderitemtittle">保险名称：</span>
						<span>${okOrder.goodName}</span>
					</div>
					<div>
						<span class="orderitemtittle">创建时间：</span>
						<fmt:formatDate value="${okOrder.createTime}" pattern="yyyy/MM/dd HH:mm:ss"/>
					</div>			
					<div style="width:100%;height:15px;background-color: #ebebeb;padding: 0px"></div>			
				</div>
			</a>
		</c:forEach>
	</div>
</div>


<%@ include file="/WEB-INF/views/shared/scripts/jquery.jsp"%>
<%@ include file="/WEB-INF/views/shared/scripts/jqweui.jsp"%>
<%@ include file="/WEB-INF/views/shared/scripts/tabmob.jsp"%>
<script type="text/javascript">
	$(function(){
		var noOrdersmsg = $("#noOrdersmsg").val();
		if(noOrdersmsg==""||noOrdersmsg==null){
			$("#p-noOrdersmsg").removeClass("ordermsg");
		}
		var okOrdersmsg = $("#okOrdersmsg").val();
		if(okOrdersmsg==""||okOrdersmsg==null){
			$("#p-okOrdersmsg").removeClass("ordermsg");
		}
		var ordermsg = $("#ordermsg").val();
		if(ordermsg==""||ordermsg==null){
			$("#p-ordermsg").removeClass("ordermsg");
		}
	});
</script>
<%@ include file="/WEB-INF/views/shared/master/weContentFooter.jsp"%>